<?php

namespace App\Models;

use App\Common\Models\BaseModel;

class PromotionConvertModel extends BaseModel
{
    /**
     * 关联到模型的数据表
     *
     * @var string
     */
    protected $table = 'promotion_converts';

    /**
     * @var array
     * 批量更新忽略字段
     */
    protected $updateIgnoreFields = [
        'created_at',
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     * 关联巨量项目模型 一对一
     */
    public function ocean_project(){
        return $this->belongsTo('App\Models\Ocean\OceanProjectModel', 'project_id', 'id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     * 关联巨量广告模型 一对一
     */
    public function ocean_promotion(){
        return $this->belongsTo('App\Models\Ocean\OceanPromotionModel', 'promotion_id', 'id');
    }
}
